package com.zjp.service;

import com.zjp.vo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "MICROCLOUD-PROVIDER-PRODUCT", fallbackFactory = ProductClientServiceFallbackFactory.class)
public interface ProductClientService {

    @RequestMapping("/prodcut/get/{id}")
     Product getProduct(@PathVariable("id")long id);

    @RequestMapping("/prodcut/list")
     List<Product> listProduct() ;

    @RequestMapping("/prodcut/add")
     boolean addPorduct(Product product) ;

}
